package com.fzhucc.modules.expert.repository;

import com.fzhucc.modules.expert.domain.ExpertReservation;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
* @website https://eladmin.vip
* @author yyg
* @date 2023-10-20
**/
public interface ExpertReservationRepository extends JpaRepository<ExpertReservation, Integer>, JpaSpecificationExecutor<ExpertReservation> {

    @Query(nativeQuery = true, value = "select * from tt_expert_reservation where expert_offline_id=:expertOfflineId")
    List<ExpertReservation> findByExpertOfflineId(int expertOfflineId);
}